<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>帖子详情</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/style/front/css/base.css"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/style/front/css/style.css"/>
</head>

<body>
<div class="head-box">
    <div class="head wrap">
    
          <div class="logo fl"><a href=""><img src="${pageContext.request.contextPath}/static/style/front/images/logo.png"/></a></div>
          <div class="head-right fr">
              <div class="head-a fr">
                     <% if(session.getAttribute("users")==null){ %>
                   <div class="head-a3 login-click fl"><a href="${pageContext.request.contextPath}/login">登录</a></div>
                   <div class="head-a4 reg-click fl"><a href="${pageContext.request.contextPath}/login">注册</a></div>          
              
            <% }else{%>             		 
              <div class="tbt fl">
              		<a href="#">
              			<img src="${pageContext.request.contextPath}/${users.picture}" style="display: inline-block;height: auto;max-width: 100%;"/>
                   </a>     
               </div>
             <%} %>
              
              
              </div>
              <div class="clearfix"></div>
              <div class="nav fr">
                  <ul>
                       <li><a href="${pageContext.request.contextPath}/">首页</a></li>
                       <li><a href="#">文章</a>
                           <div class="sub-nav">
                                <div class="bich-top"></div>
                                 <div class="bich">
                                     <a href="#">服饰</a>
                                     <a href="#">美食</a>
                                     <a href="#">出行</a>
                                     <a href="#">约会</a>
                                 </div>
                           
                           </div>
                       </li>
                       <li class="nav-cut"><a href="#">社区</a></li>
                       <li><a href="#">课程</a></li>
                       <li><a href="#">活动</a></li>
                       <li><a href="#">联系我们</a></li>
                  </ul>
              </div>
              <div class="clearfix"></div>
          </div>
    </div>
</div>

<div class="content">
    <div class="wrap">
            <div class="art-height"></div>
            <div class="post">
                   <div class="post-fl fl">
                         <div class="post-a1">${topics.title }</div>
                         <div class="post-a2">shuiguodaren<span>${topics.topictime}</span>
                                               <div class="col-c">
                                                    <span><img src="${pageContext.request.contextPath}/static/style/front/images/col-c1.jpg">0</span>
                                                    <span><img src="${pageContext.request.contextPath}/static/style/front/images/col-c2.jpg">3</span>
                                                    <em><img src="${pageContext.request.contextPath}/static/style/front/images/col-c3.jpg"></em>
                                                    <em><img src="${pageContext.request.contextPath}/static/style/front/images/col-c4.jpg"></em>
                                                    <em><img src="${pageContext.request.contextPath}/static/style/front/images/col-c5.jpg"></em>
                                                </div>
                         </div>
                         <div class="post-a3">
                               <span>${topicslabels.name}</span>                               
                         </div>
                         <div class="post-a4"><img src="${pageContext.request.contextPath}/static/style/front/upload/post-a2.jpg"/></div>
                         <div class="post-b">
                               <p>${topics.content }</p>
                              
                         </div>
                         
                         <% if(session.getAttribute("users")==null){ %>
                         <div class="det-b">                        		
                                 <div class="det-title"><img src="${pageContext.request.contextPath}/static/style/front/images/cou-b1.jpg"/>
                                 <a href="${pageContext.request.contextPath}/login">登陆后评论</a>
                                </div>                          
                          </div>
                          <% }else{%>
	                         <form action="${pageContext.request.contextPath}/fronts/addcomment/${topics.id}" method="post">
	                         <div class="det-b">
	                         		<input type="hidden" name="users.id" value="${users.id}"/>
	                         		<input type="hidden" name="topics.id" value="${topics.id}"/>
	                         		<input type="hidden" name="floor" value="${floor}"/>
	                                 <div class="det-title"><img src="${pageContext.request.contextPath}/static/style/front/images/cou-b1.jpg"/>在线评论</div>
	                                 <div class="det-b1">
	                                      <textarea class="det-area post-area" name="content"></textarea>
	                                 </div>
	                                 <div class="det-b3"><input type="submit" class="det-btn" value="发表"/></div>
	                          </div>
	                          </form>
                          <%} %> 
                         <div class="skt">
                 <div class="skt-title">
                       <span class="skt-cut">默认评论</span><em>|</em><span>最新评论</span>
                 </div>
                 <div class="skt-tab">
                          <div class="skt-btm">
                               <ul class="skt-ul">
                               <c:forEach items="${comments}" var="item">
                                     <li>
                                            <div class="skt-a1"><img src="${pageContext.request.contextPath}/static/style/front/upload/det-tx.jpg"/>${item.commenttime}
                                                                <div class="menu"><a href=""><img src="${pageContext.request.contextPath}/static/style/front/images/menu.jpg"/></a></div></div>
                                            <div class="skt-a2">${item.content}</div>
                                            <div class="skt-a3"><a href=""><img src="${pageContext.request.contextPath}/static/style/front/upload/det-b.jpg"/>我要点评</a>
                                                    <div class="menu-a"><img src="${pageContext.request.contextPath}/static/style/front/images/menu-a1.jpg"/>0
                                                                        <span><img src="${pageContext.request.contextPath}/static/style/front/images/menu-a2.jpg"/>0</span></div>
                                            </div>
                                     </li>                                     
                                </c:forEach>        
                               </ul>
                               <div class="skt-more"><a href="">查看更多</a></div>
                          </div>
                      
                          <div class="skt-btm hide">
                               222
                          </div>
                 </div>
           </div>      
                   </div><!--post-fl-->
                   <div class="post-fr fr">
                           <div class="post-r">
                                   <div class="post-r1" style="margin: 10px auto;"><img src="${pageContext.request.contextPath}/${author.picture}" style="border-radius: 50%;display: inline-block;height: auto;max-width: 100%;"/></div>
                                   <div class="post-r2" style="margin-top: 50px">${author.nickname}</div>                                
                                   <div class="post-r4" style="margin-top: 30px" ><a href="">+关注</a><span>|</span><a href="">私信</a></div>
                           </div>
                           <div class="post-t"><a href=""><img src="${pageContext.request.contextPath}/static/style/front/upload/post-a3.jpg"/></a></div>
                           <div class="post-y">
                                 <div class="post-y1"><img src="${pageContext.request.contextPath}/static/style/front/images/cou-b1.jpg"/>推荐帖子</div>
                                 <ul>
                                      <a href=""><li>
                                           <div class="post-y2"><img src="${pageContext.request.contextPath}/static/style/front/upload/post-a4.png"/></div>
                                           <div class="post-y3">追妹子，你准备好了吗？</div>
                                      
                                      </li></a>
                                      
                                      <a href=""><li>
                                           <div class="post-y2"><img src="${pageContext.request.contextPath}/static/style/front/upload/post-a4.png"></div>
                                           <div class="post-y3">追妹子，你准备好了吗？</div>
                                      
                                      </li></a>
                                      
                                      <a href=""><li>
                                           <div class="post-y2"><img src="${pageContext.request.contextPath}/static/style/front/upload/post-a4.png"></div>
                                           <div class="post-y3">追妹子，你准备好了吗？</div>
                                      
                                      </li></a>
                                      
                                      <a href=""><li>
                                           <div class="post-y2"><img src="${pageContext.request.contextPath}/static/style/front/upload/post-a4.png"></div>
                                           <div class="post-y3">追妹子，你准备好了吗？</div>
                                      
                                      </li></a>
           
                                 </ul>
                           </div>
                   </div>
            </div>
    </div>      
</div>

<div class="footer">
   <div class="wrap">
      <div class="foot">
            <div class="foot-left fl">
                 <a href="">关于我们</a>
                 <a href="">加入我们</a>
                 <a href="contact.html">联系我们</a>
                 <a href="">媒体采访</a>
            </div>
            <div class="foot-c fl"><a href=""><img src="${pageContext.request.contextPath}/static/style/front/images/foot-logo.jpg"></a></div>
            <div class="foot-right fr">
                 <a href="">同城活动</a>
                 <a href="">课程资讯</a>
                 <a href="">最新发布</a>
                 <a href="">热门文章</a>
            </div>
       </div> 
       <div class="foot-btm">网页制作by云邦</div>    
   </div>
</div>


<!--登录注册弹窗-->
<div class="mask"></div>
<div class="login">
    <div class="login-title">
        <div class="login-a">登录</div>
        <div class="login-b"></div>
        <div class="login-c close">x</div>
    </div>
    <div class="login-btm">
        <div class="login-d"><input type="text" class="login-text" placeholder="注册时填写的邮箱"></div>
        <div class="login-d"><input type="password" class="login-pas" placeholder="密码"></div>
        <div class="login-d"><input type="button" class="login-btn" placeholder="登录"></div>
        <div class="login-f">
             <a href="">忘记密码</a>
             <span>还没有焦点账号?><a href="javascript:;" class="reg-href">点击注册</a></span>
        </div>
    </div>
</div>

<div class="reg">
    <div class="login-title">
        <div class="login-a">注册</div>
        <div class="login-b"></div>
        <div class="login-c close">x</div>
    </div>
    <div class="login-btm">
        <div class="login-d"><input type="text" class="login-text" placeholder="邮箱/手机号"></div>
        <div class="login-d"><input type="password" class="login-pas" placeholder="密码"></div>
        <div class="login-d"><input type="button" class="login-btn" placeholder="注册"></div>
        <div class="login-f">
             <a href="">忘记密码</a>
        </div>
    </div>
</div>

<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/Action.js"></script>
<script>
    $(".skt-title span").click(function(){
		 $(this).addClass("skt-cut").siblings().removeClass("skt-cut"),
		 $(".skt-tab .skt-btm").hide().eq($(".skt-title span").index(this)).show()
    })
</script>
</body>
</html>

